﻿<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE xsl:stylesheet  [
	<!ENTITY nbsp   "&#160;">
	<!ENTITY copy   "&#169;">
	<!ENTITY reg    "&#174;">
	<!ENTITY trade  "&#8482;">
	<!ENTITY mdash  "&#8212;">
	<!ENTITY ldquo  "&#8220;">
	<!ENTITY rdquo  "&#8221;"> 
	<!ENTITY pound  "&#163;">
	<!ENTITY yen    "&#165;">
	<!ENTITY euro   "&#8364;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:user="CityFly">
    <xsl:output method="html" encoding="utf-8" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
  <xsl:param name="rowcount"/>			<!--数据库总记录数-->
  <xsl:param name="maxrow"/>				<!--每页记录数-->
  <xsl:param name="curpage"/>				<!--当前页码-->
  <xsl:param name="param"/>					<!--引入 param 参数-->
  <xsl:param name="templatename"/>	<!--Label.xml 模块名称-->
  <xsl:param name="orderby"/>				<!--Label.xml orderby 参数-->
  <xsl:param name="where"/>					<!--Label.xml where 参数-->
  <xsl:param name="runtime"/>				<!--运行时长-->
  <msxsl:script language="javascript" implements-prefix="user">var n=5;
    var mR={MAXROW};
    function PageList(cP,rC,qStr){
    var pC=(rC%mR==0)?rC/mR:int(rC/mR)+1;
    var pStr="";
    cP=int(cP);
    if (pC>cP+n){var eP=cP+n;}else{var eP=pC;}
    if (cP-n&lt;=0){var sP=1;}else{var sP=cP-n;}
    if(cP>1){pStr=pStr+" &lt;a href=javascript:TM.tList("+(cP-1)+")&gt;&lt;&lt;&lt;\/a&gt; ";}
    if (cP>n+1){pStr=pStr+"&lt;a href=javascript:TM.tList(1)&gt;1&lt;\/a&gt; ...";}
    for (var i=sP;i&lt;=eP;i++)
    {
    if (i==cP)
    {
    pStr=pStr+" &lt;font class='current' &gt;&lt;b&gt;"+i+"&lt;/b&gt;&lt;\/font&gt; ";
    }else{
    pStr=pStr+" &lt;a href=javascript:TM.tList(" + i + ")&gt;"+i+"&lt;\/a&gt; ";
    }
    }
    if (pC>cP+n){pStr=pStr+"... &lt;a href=javascript:TM.tList("+pC+") class='path'&gt;"+pC+"&lt;\/a&gt;";}
    if(cP&lt;pC){pStr=pStr+" &lt;a href=javascript:TM.tList("+(cP+1)+")&gt;&gt;&gt;&lt;\/a&gt; ";}
    return pStr;
    }</msxsl:script>
  <xsl:template match="/">
    <div class="datastatus">
      <div id="runtime">
        <strong>&nbsp;运行时长</strong><img src="/icons/tangle.gif" width="10" height="10" hspace="2" align="absmiddle" /><xsl:value-of select="substring($runtime,1,6)"/>秒      </div>
      <div class="all">
        <input class="btnA" onclick="TM.tQuery()" type="button" value="全部" name="Submit52" />
      </div>
      <div class="query">
        <strong>查询条件<img src="/icons/tangle.gif" width="10" height="10" hspace="2" vspace="2" align="absmiddle" /></strong> <span id="queryString_{$templatename}">&nbsp;</span>      </div>
    </div>
    <div class="datahead">
      <div class="colLeft" style="MARGIN-TOP: 0px; WIDTH: 30px">
        <input 
onclick="TM.CheckBoxSelect('catalogID',this.checked)" type="checkbox" />
      </div>
      <div class="colLeft" style="WIDTH: 50px">
        排序
      </div>
      <div class="colLeft" style="WIDTH: 60px">
        编码
      </div>
      <div class="colLeft" style="WIDTH: 150px;">
        上级名称
      </div>
      <div class="colLeft" style="WIDTH: 150px">
        分类名称
      </div>
      <div class="colLeft" style="WIDTH: 50px">
        顺序号
      </div>
      <div class="colRight center" style="WIDTH: 60px;">
        操作
      </div>
    </div>
    <div class="datalist">
      <xsl:for-each select="rows/row">
        <div class="row">
          <xsl:attribute name="onclick">javascript://setDivBgColor(this.parentElement,this);</xsl:attribute>
          <b class="colLeft" style="WIDTH:30px">
          <input type="checkbox" name="catalogID" id="catalogID" unread="false" >
          <xsl:attribute name="value"><xsl:value-of select="ID"/></xsl:attribute>
          <xsl:if test="F_IsDefault=1">
            <xsl:attribute name="disabled">1</xsl:attribute>
          </xsl:if>
          </input>
          </b>
          <div class="colLeft" style="FLOAT: left; WIDTH: 50px" align="center">
            <a title="向上" href="javascript:"> <xsl:attribute name="onclick">javascript:if(TM.doCmd('排序','mid=<xsl:value-of select="MID"/>&amp;topid=<xsl:value-of select="TopID"/>&amp;updown=0'))TM.tList()</xsl:attribute>
            ↑</a>&nbsp;&nbsp;&nbsp;<a title="向下" href="javascript:"> <xsl:attribute name="onclick">javascript:if(TM.doCmd('排序','mid=<xsl:value-of select="MID"/>&amp;topid=<xsl:value-of select="TopID"/>&amp;updown=1'))TM.tList();</xsl:attribute>
            ↓</a>
          </div>
          <a class="L" href="javascript:" > <xsl:attribute name="onclick">TM.openTab('编辑分类','<xsl:value-of select="ID"/>');</xsl:attribute>
          <div class="colLeft" style="WIDTH: 60px">
            <xsl:value-of select="ID"/>
          </div>
          <div class="colLeft" style="WIDTH: 150px;">
            <xsl:value-of select="F_PName"/>
          </div>
          <div class="colLeft" style="WIDTH: 150px;">
            <xsl:value-of select="F_Name"/>
          </div>
          <div class="colLeft" style="WIDTH: 50px">
            <xsl:value-of select="F_Order"/>
          </div>
          </a>
          <div class="colRight center" style="FLOAT: right; WIDTH: 60px; ">
            [<a href="javascript:" > <xsl:attribute name="onclick">TM.openTab('编辑分类','<xsl:value-of select="ID"/>')</xsl:attribute>
            修改</a>]
          </div>
        </div>
      </xsl:for-each>
    </div>
    <div class="pagelist">
      <div class="menu">
        [&nbsp;<a href="javascript:TM.CheckBoxSelect('ID',1);">全选</a>｜<a href="javascript:TM.CheckBoxSelect('ID',0);">取消</a>｜<a href="javascript:TM.CheckBoxSelect('ID',2);">反选</a>&nbsp;] 
        &nbsp;&nbsp;
        <input id="Submit522" class="btnA" onclick="TM.openTab('编辑分类','0');" type="button" value="新增" name="Submit522" />
        <input id="Submit52" class="btnA" onclick="if(TM.doCheckBoxCmd('删除分类','catalogID','0',false))TM.tList();" type="button" value="删除" name="Submit52" />
      </div>
      <div class="pager">
      每页{MAXROW}条| 共有 {ROWCOUNT} 条&nbsp;| 分页:<xsl:value-of select="user:PageList($curpage,$rowcount,'')" disable-output-escaping="yes"/>
    </div>
    </div>
  </xsl:template>
</xsl:stylesheet>
